<template>
  <div class="excellent-web">
    <div class="header bg-red text-center font-bolder">
      <font class="font30" color="#fff">↓↓↓精选↓↓↓优秀↓↓↓网站↓↓↓</font>
    </div>
    <div class="notice bg-green text-center">
      <font class="font16" color="#800080">
        花仙子通知:以下是网上精选六合网站，仅供彩民参考！资料对错与本站无关。
      </font>
    </div>
    <template v-for="(item, index) of data.excellentWeb">
      <div
        :style="{
          borderBottom:
            index < data.excellentWeb.length - 1
              ? '0.1rem solid #00ffff'
              : 0,
        }"
        class="item-content font35 text-center font-bolder"
        @click="toPage(item.url)"
      >
        <font class="black"
          >{{ item.period }}：{{ item.title
          }}<span class="green">{{ item.content }}</span
          >{{ item.desc }}</font
        >
      </div>
    </template>
  </div>
</template>
<script setup>
import BoxContainer from "@/components/BoxContainer.vue";
import { onMounted, reactive } from "vue";
import { getApiExcellentWebData } from "@/api/api";

const data = reactive({
  excellentWeb: [],
});
const toPage = (url) => {
  window.open(url);
};
onMounted(() => {
  getExcellentWebData()
})
const getExcellentWebData = () => {
  getApiExcellentWebData({type:4,style:1}).then(res => {
    data.excellentWeb = res
  })
}
</script>
<style lang="less" scoped>
.excellent-web {
  background: #fff;
  border: 0.1rem solid #00ffff;
}
.header {
  padding: 5px 0;
}
.item-content {
  cursor: pointer;
  padding: 0.8rem 0;
}
</style>
